<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //如果一个变量声明未赋值 警示undefined 未定义数据类型
        var str;
        console.log(str);
        var variable = undefined;
        console.log(variable + 'lizhangping');//undefinedlizahngping
        console.log(variable + 1); //NaN  undefined  和数字相加  最后结果是 NaN
        // 空值
        var space = null;
        console.log(space + 'lzp'); //nulllzp
        console.log(space + 1); // 1

    </script>
</head>
<body>
    
</body>
</html>